﻿Imports System.Web.UI.WebControls

Namespace DotNetNuke.Modules.ActiveForums
    Partial Public Class af_posticonlist
        Inherits System.Web.UI.UserControl
        Private _Theme As String
        Private _PostIcon As String
        Public Property Theme() As String
            Get
                Return _Theme
            End Get
            Set(ByVal value As String)
                _Theme = value
            End Set
        End Property
        Public Property PostIcon() As String
            Get
                Return _PostIcon 'PostIcon = rblMessageIcons1.SelectedItem.Value
            End Get
            Set(ByVal value As String)
                _PostIcon = value
            End Set
        End Property
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Try
                'If Not Page.IsPostBack Then
                LoadPostIcons()
                If Not String.IsNullOrEmpty(PostIcon) Then
                    rblMessageIcons1.SelectedIndex = rblMessageIcons1.Items.IndexOf(rblMessageIcons1.Items.FindByValue(PostIcon))
                End If
                'End If


            Catch ex As Exception

            End Try
        End Sub
        Private Sub LoadPostIcons()
            rblMessageIcons1.Items.Clear()
            Dim MyTheme As String = Theme
            Dim strHost As String = DotNetNuke.Common.Globals.AddHTTP(DotNetNuke.Common.Globals.GetDomainName(Request)) & "/"
            rblMessageIcons1.Items.Insert(0, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/biggrin.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "biggrin.gif"))
            rblMessageIcons1.Items.Insert(1, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/crazy.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "crazy.gif"))
            rblMessageIcons1.Items.Insert(2, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/cry.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "cry.gif"))
            rblMessageIcons1.Items.Insert(3, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/arrow.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "arrow.gif"))
            rblMessageIcons1.Items.Insert(4, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/hazard.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "hazard.gif"))
            rblMessageIcons1.Items.Insert(5, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/explanationmark.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "explanationmark.gif"))
            rblMessageIcons1.Items.Insert(6, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/w00t.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "w00t.gif"))
            rblMessageIcons1.Items.Insert(7, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/pinch.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "pinch.gif"))
            rblMessageIcons1.Items.Insert(8, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/whistling.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "whistling.gif"))
            rblMessageIcons1.Items.Insert(9, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/sad.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "sad.gif"))
            rblMessageIcons1.Items.Insert(10, New ListItem("<img src=""" & strHost & "DesktopModules/ActiveForums/themes/" & MyTheme & "/emoticons/questionmark.gif"" width=""20"" height=""20"" align=""absmiddle"">&nbsp;&nbsp;&nbsp;&nbsp;", "questionmark.gif"))
            rblMessageIcons1.Items.Insert(11, New ListItem(Utilities.GetSharedResource("[RESX:PostIconNone]"), String.Empty))
            rblMessageIcons1.SelectedIndex = 11
        End Sub
    End Class
End Namespace
